package com.ssrs.framework.data.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 是否使用自定义拦截器输出日志配置
 *
 * @author ssrs
 */
@Component
@Configuration
public class SqlLogProperties {

    /**
     * 是否输出sql日志到控制台
     */
    @Value("${sqlLog.printfLog:true}")
    private boolean printfLog;


    /**
     * 是否将sql日志记录到数据库
     */
    @Value("${sqlLog.saveToDB:true}")
    private boolean saveToDB;

    public boolean isPrintfLog() {
        return printfLog;
    }

    public void setPrintfLog(boolean printfLog) {
        this.printfLog = printfLog;
    }

    public boolean isSaveToDB() {
        return saveToDB;
    }

    public void setSaveToDB(boolean saveToDB) {
        this.saveToDB = saveToDB;
    }
}
